package com.dqp.cslggroup.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.dqp.cslggroup.bean.academic;
import com.dqp.cslggroup.bean.avatar;
import com.dqp.cslggroup.bean.Calendar;
import com.dqp.cslggroup.bean.CalendarEvent;
import com.dqp.cslggroup.bean.course;
import com.dqp.cslggroup.bean.event;
import com.dqp.cslggroup.bean.exam;
import com.dqp.cslggroup.bean.note;
import com.dqp.cslggroup.bean.roomElectricity;
import com.dqp.cslggroup.bean.Score;
import com.dqp.cslggroup.bean.student;

import com.dqp.cslggroup.greendao.academicDao;
import com.dqp.cslggroup.greendao.avatarDao;
import com.dqp.cslggroup.greendao.CalendarDao;
import com.dqp.cslggroup.greendao.CalendarEventDao;
import com.dqp.cslggroup.greendao.courseDao;
import com.dqp.cslggroup.greendao.eventDao;
import com.dqp.cslggroup.greendao.examDao;
import com.dqp.cslggroup.greendao.noteDao;
import com.dqp.cslggroup.greendao.roomElectricityDao;
import com.dqp.cslggroup.greendao.ScoreDao;
import com.dqp.cslggroup.greendao.studentDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig academicDaoConfig;
    private final DaoConfig avatarDaoConfig;
    private final DaoConfig calendarDaoConfig;
    private final DaoConfig calendarEventDaoConfig;
    private final DaoConfig courseDaoConfig;
    private final DaoConfig eventDaoConfig;
    private final DaoConfig examDaoConfig;
    private final DaoConfig noteDaoConfig;
    private final DaoConfig roomElectricityDaoConfig;
    private final DaoConfig scoreDaoConfig;
    private final DaoConfig studentDaoConfig;

    private final academicDao academicDao;
    private final avatarDao avatarDao;
    private final CalendarDao calendarDao;
    private final CalendarEventDao calendarEventDao;
    private final courseDao courseDao;
    private final eventDao eventDao;
    private final examDao examDao;
    private final noteDao noteDao;
    private final roomElectricityDao roomElectricityDao;
    private final ScoreDao scoreDao;
    private final studentDao studentDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        academicDaoConfig = daoConfigMap.get(academicDao.class).clone();
        academicDaoConfig.initIdentityScope(type);

        avatarDaoConfig = daoConfigMap.get(avatarDao.class).clone();
        avatarDaoConfig.initIdentityScope(type);

        calendarDaoConfig = daoConfigMap.get(CalendarDao.class).clone();
        calendarDaoConfig.initIdentityScope(type);

        calendarEventDaoConfig = daoConfigMap.get(CalendarEventDao.class).clone();
        calendarEventDaoConfig.initIdentityScope(type);

        courseDaoConfig = daoConfigMap.get(courseDao.class).clone();
        courseDaoConfig.initIdentityScope(type);

        eventDaoConfig = daoConfigMap.get(eventDao.class).clone();
        eventDaoConfig.initIdentityScope(type);

        examDaoConfig = daoConfigMap.get(examDao.class).clone();
        examDaoConfig.initIdentityScope(type);

        noteDaoConfig = daoConfigMap.get(noteDao.class).clone();
        noteDaoConfig.initIdentityScope(type);

        roomElectricityDaoConfig = daoConfigMap.get(roomElectricityDao.class).clone();
        roomElectricityDaoConfig.initIdentityScope(type);

        scoreDaoConfig = daoConfigMap.get(ScoreDao.class).clone();
        scoreDaoConfig.initIdentityScope(type);

        studentDaoConfig = daoConfigMap.get(studentDao.class).clone();
        studentDaoConfig.initIdentityScope(type);

        academicDao = new academicDao(academicDaoConfig, this);
        avatarDao = new avatarDao(avatarDaoConfig, this);
        calendarDao = new CalendarDao(calendarDaoConfig, this);
        calendarEventDao = new CalendarEventDao(calendarEventDaoConfig, this);
        courseDao = new courseDao(courseDaoConfig, this);
        eventDao = new eventDao(eventDaoConfig, this);
        examDao = new examDao(examDaoConfig, this);
        noteDao = new noteDao(noteDaoConfig, this);
        roomElectricityDao = new roomElectricityDao(roomElectricityDaoConfig, this);
        scoreDao = new ScoreDao(scoreDaoConfig, this);
        studentDao = new studentDao(studentDaoConfig, this);

        registerDao(academic.class, academicDao);
        registerDao(avatar.class, avatarDao);
        registerDao(Calendar.class, calendarDao);
        registerDao(CalendarEvent.class, calendarEventDao);
        registerDao(course.class, courseDao);
        registerDao(event.class, eventDao);
        registerDao(exam.class, examDao);
        registerDao(note.class, noteDao);
        registerDao(roomElectricity.class, roomElectricityDao);
        registerDao(Score.class, scoreDao);
        registerDao(student.class, studentDao);
    }
    
    public void clear() {
        academicDaoConfig.clearIdentityScope();
        avatarDaoConfig.clearIdentityScope();
        calendarDaoConfig.clearIdentityScope();
        calendarEventDaoConfig.clearIdentityScope();
        courseDaoConfig.clearIdentityScope();
        eventDaoConfig.clearIdentityScope();
        examDaoConfig.clearIdentityScope();
        noteDaoConfig.clearIdentityScope();
        roomElectricityDaoConfig.clearIdentityScope();
        scoreDaoConfig.clearIdentityScope();
        studentDaoConfig.clearIdentityScope();
    }

    public academicDao getAcademicDao() {
        return academicDao;
    }

    public avatarDao getAvatarDao() {
        return avatarDao;
    }

    public CalendarDao getCalendarDao() {
        return calendarDao;
    }

    public CalendarEventDao getCalendarEventDao() {
        return calendarEventDao;
    }

    public courseDao getCourseDao() {
        return courseDao;
    }

    public eventDao getEventDao() {
        return eventDao;
    }

    public examDao getExamDao() {
        return examDao;
    }

    public noteDao getNoteDao() {
        return noteDao;
    }

    public roomElectricityDao getRoomElectricityDao() {
        return roomElectricityDao;
    }

    public ScoreDao getScoreDao() {
        return scoreDao;
    }

    public studentDao getStudentDao() {
        return studentDao;
    }

}
